<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="common/header.jsp"%>
		
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">
					<div class="wrap-left">
						<div class="wrap-list">
							<div class="m-user">
								<!--个人信息 -->

								<div class="m-userinfo">
									<a href="news.html">
										<div class="tipsBox"><i class="am-icon-envelope"></i></div>
									</a>
									<div class="m-baseinfo">
										<a class="m-pic" href="information.html">
											<img src="${pageContext.request.contextPath }/statics/images/frameImages/getAvatar.do.jpg">
										</a>
										<div class="m-info">
											<em class="s-name">${userSession.userName }</em>
 											<div class="vip1"><a href="#"><span></span><em>会员专享</em></a></div>
											<div class="safeText"><a href="safety.html">账户安全:<em style="margin-left:20px ;">60</em>分</a>
												<div class="progressBar"><span style="left: -95px;" class="progress"></span></div>
											</div>
										</div>
									</div>
									<div class="m-right">
										<div class="m-new">
											<a href="news.html"><i class="am-icon-dropbox  am-icon-md" style="padding-right:5px ;"></i>消息盒子</a>
										</div>

									</div>
								</div>

								<!--个人资产-->
								<div class="m-userproperty">
									<div class="s-bar">
										<i class="s-icon"></i>个人资产
									</div>
									<p class="m-wallet">
										<a href="wallet.html">
											<em class="m-num">100000.00</em>
											<span class="m-title">账户余额</span>
										</a>
									</p>
								</div>

								<!--我的钱包-->
								<div class="wallet">
									<div class="s-bar">
										<i class="s-icon"></i>钱包
									</div>
									<p class="m-big squareS">
										<a href="#">
											<i><img src="${pageContext.request.contextPath }/statics/images/frameImages/shopping.png"/></i>
											<span class="m-title">旅游</span>
										</a>
									</p>
									<p class="m-big squareA">
										<a href="#">
											<i><img src="${pageContext.request.contextPath }/statics/images/frameImages/safe.png"/></i>
											<span class="m-title">安全</span>
										</a>
									</p>
									<p class="m-big squareL">
										<a href="#">
											<i><img src="${pageContext.request.contextPath }/statics/images/frameImages/profit.png"/></i>
											<span class="m-title">灵活</span>
										</a>
									</p>
								</div>

							</div>
							<div class="box-container-bottom"></div>

							<!--订单 -->
							<div class="m-order">
								<div class="s-bar">
									<i class="s-icon"></i>我的订单
									<a class="i-load-more-item-shadow" href="orderAll.html">全部订单</a>
								</div>
								<c:forEach var="bill" items="${bill}">
									<div class="orderContentBox">
										<div class="orderContent">
											<div class="orderContentpic">
												<div class="imgBox">
													<a href="orderinfo.html"><img src="/pic/${bill.org_pic}"></a>
												</div>
											</div>
											<div class="detailContent">
												<c:if test="${bill.proType==1 }">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=1&b_id=${bill.b_id}" class="delivery">${bill.p_Name}</a>
												</c:if>
												<c:if test="${bill.proType==2 }">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=2&b_id=${bill.b_id}" class="delivery">${bill.p_Name}</a>
												</c:if>
												<c:if test="${bill.proType==4 }">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=4&b_id=${bill.b_id}" class="delivery">${bill.p_Name}</a>
												</c:if>
												
												
												<div class="orderID">
													<span class="time"><fmt:formatDate value="${bill.createDate}"/> </span>
												</div>
											</div>
											<div class="state">
												<c:if test="${bill.status==1 && bill.isPay==1}">已成交</c:if>
												<c:if test="${bill.status==0 && bill.isPay==1}">待商家确认</c:if>
												<c:if test="${bill.isPay==0}">未支付</c:if>
											</div>
											<div class="price"><span class="sym">${bill.totalPrice}</div>
	
										</div>
										
											<c:if test="${bill.status==1 && bill.isPay==1}">
												<a href="javascript:;" class="btnPay delete" b_id="${bill.b_id}" p_Name="${bill.p_Name}" >
												删除订单
												</a>
											</c:if>
											<c:if test="${bill.isPay==0}">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=${bill.proType}&b_id=${bill.b_id}"  class="btnPay">
													支付订单
													</a>
											</c:if>
											<c:if test="${bill.isPay==1 && bill.status==0}">
												<a href="javascript:void(0);" class="btnPay">
												提醒商家确认
												</a>
											</c:if>
									</div>

								</c:forEach>
							</div>
						</div>
					</div>
					<div class="wrap-right">

						<!-- 日历-->
						<div class="day-list">
							<div class="s-title">
								每日新鲜事
							</div>
							<div class="s-box">
								<ul>
									<li><a><p>畅享豪华度假游只需998</p></a></li>
									<li><a><p>家庭经济游</p></a></li>
									<li><a><p>度假休闲靠海别墅</p></a></li>
									<li><a><p>上刀山下火海之旅</p></a></li>							
								</ul>
							</div>
						</div>
						<!--新品 -->
						<div class="new-goods">
							
						</div>						

						<!--热卖推荐 -->
						<div class="new-goods">
							
						</div>						
     				</div>
     				<div class="clear"></div>
     				
     				<!--收藏和足迹-->
     				 


				</div>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">由来游去</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">详情</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于我们</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
						</p>
					</div>
				</div>

			</div>
<%@include file="common/footer.jsp"%>
	</body>
<script type="text/javascript">
	
	
			$(".delete").on("click",function(){
				var obj = $(this);
				var bid = obj.attr("b_id");
				if(confirm("是否要删除【"+obj.attr("p_Name")+"】")){
					$.ajax({
						url : "/Trip/user/del",
						dataType : "json",
						data : {b_id:bid},
						type : "GET",
						success : function(date){
							if(date == "success"){
								alert("删除成功!");
								window.location.reload();
							}else if(date == "error"){
								alert("删除失败!");
								window.location.reload();
							};
						}
					});
				
				}
			});
		
	

</script>
</html>